<?php

declare(strict_types=1);

namespace SixShop\Wangdian\Exception;

/**
 * Validation related exceptions
 */
class ValidationException extends WangdianException
{
    public function __construct(
        string $message = '',
        int $code = 0,
        ?\Throwable $previous = null,
        ?array $context = null,
        protected readonly array $errors = []
    ) {
        parent::__construct($message, $code, $previous, $context);
    }

    public function getErrors(): array
    {
        return $this->errors;
    }
}